<?=html::script('js/validator.js')?>
<div id="left-740" style="padding-left:20px;">
	<div class="box-h1">
		<h1><?=Kohana::lang('site.change').Kohana::lang('site.userinfo')?></h1>
		<div class="box1 sform">
			<form action="<?=url::site('user/saveprofile')?>" onsubmit="return Validator.Validate(this,3)" method="post" id="register">
				<h3><?=Kohana::lang('site.personal_information')?></h3>
				<ul><li>
					<span class="label"><?=Kohana::lang('site.username')?></span>
					<span class="required"></span>
					<span><?=$profile->username?></span>
				</li><li>
					<span class="label"><?=Kohana::lang('site.first_name')?></span>
					<span class="required">*</span>
					<span><input name="firstname" value="<?=$profile->firstname?>" type="text" dataType="ASCII" msg="请输入姓，只能包含英文字母和数字"/></span>
				</li><li>
					<span class="label"><?=Kohana::lang('site.last_name')?></span>
					<span class="required">*</span>
					<span><input name="lastname" value="<?=$profile->lastname?>" type="text" dataType="ASCII" msg="请输入名，只能包含英文字母和数字"/></span>
				</li><li>
					<span class="label"><?=Kohana::lang('site.company')?></span>
					<span class="required"></span>
					<span><input name="company" value="<?=$profile->company?>" type="text"/></span>
				</li></ul>
				<br/><h3><?=Kohana::lang('site.contact_information')?></h3>
				<ul><li>
					<span class="label"><?=Kohana::lang('site.email')?></span>
					<span class="required">*</span>
					<span><input name="email" value="<?=$profile->email?>" type="text" name="email" dataType="Email" msg="信箱格式不正确" /></span>
				</li><li>
					<span class="label"><?=Kohana::lang('site.phone')?></span>
					<span class="required"></span>
					<span><input name="phone" value="<?=$profile->phone?>" type="text"/></span>
				</li><li>
					<span class="label"><?=Kohana::lang('site.fax')?></span>
					<span class="required"></span>
					<span><input name="fax" value="<?=$profile->fax?>" type="text"/></span>
				</li><li>
					<span class="label"></span>
					<span class="required"></span>
					<span><input type="Submit" value="<?=Kohana::lang('site.save')?>"/></span>
				</li></ul>
			</form>
		</div>
	</div>
</div>
<script type="text/javascript">
	function checkUserName(username)
	{
		if(/.+/.test(username))
		{
			ajax("<?=url::base()?>ajax/checkusername/"+username, 'script');
		}
		
		return false;
	}
	function getZones(country_id, domID)
	{
		ajax("<?=url::base()?>ajax/getzones/"+country_id, 'update', domID);
	}
</script>